package com.cheyun.netsalev3.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

class FragmentLazyStateAdapter (
        fragmentActivity: FragmentActivity,
        private val fragments: MutableList<Fragment>
) :
        FragmentStateAdapter(fragmentActivity) {

    override fun getItemCount() = fragments.size

    override fun createFragment(position: Int) = fragments[position]
}